package com.lh.runmanage.service.Impl;

import com.lh.runmanage.dao.LogMapper;
import com.lh.runmanage.model.InPutParam.LogByPageModel;
import com.lh.runmanage.model.InPutParam.LogInParam;
import com.lh.runmanage.model.LogModel;
import com.lh.runmanage.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ：梁昊，后端工程师：梁昊
 * @create 2021-07-12 15:59
 * @function
 * @editLog
 */
@SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection")
@Service
public class LogServiceImpl implements LogService {
    @Autowired
    LogMapper logMapper;
    /**
     * 分页系统日志
     *
     * @return 分页数据
     */
    @Override
    public List<LogModel> selectLogByPage(LogByPageModel logByPageModel) {
        return logMapper.selectLogByPage(logByPageModel);
    }

    /**
     * 增加一条系统日志
     *
     * @param logInParam com.lh.runmanage.model.InPutParam.LogInParam
     * @return 影响条数
     */
    @Override
    public int insertLog (LogInParam logInParam) {
        return logMapper.insertLog(logInParam);
    }

    /**
     * 自动删除系统日志
     *
     * @param logInParam com.lh.runmanage.model.InPutParam.LogInParam
     * @return 影响条数
     */
    @Override
    public int deleteLogByCreateDate (LogInParam logInParam) {
        return logMapper.deleteLogByCreateDate(logInParam);
    }

}